import Vue from 'vue';
import App from './App.vue';
import router from './router';
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import Message from "element-ui/packages/message/src/main";
import {http} from './network/http-dev';
import 'assets/fonts/iconfont';
import 'assets/fonts/iconfont.css';
import TreeTable from "vue-table-with-tree-grid";
import VueQuillEditor from "vue-quill-editor/src";
import 'quill/dist/quill.core.css';
import 'quill/dist/quill.snow.css';
import 'quill/dist/quill.bubble.css';
Vue.use(ElementUI);
Vue.config.productionTip = false;
Vue.prototype.$message = Message;
Vue.prototype.$http = http;
Vue.component('tree-table',TreeTable);
Vue.use(VueQuillEditor);
Vue.filter('datetimeFormat',function (datetime) {
  let date = new Date(datetime);
  let y = date.getFullYear();
  let M = ((date.getMonth()+1)+'').padStart(2,'0');
  let d = (date.getDay()+'').padStart(2,'0');
  let h = (date.getHours()+'').padStart(2,'0');
  let m = (date.getMinutes()+'').padStart(2,'0');
  let s = (date.getSeconds()+'').padStart(2,'0');
  return `${y}-${M}-${d} ${h}:${m}:${s}`;
});
new Vue({
  router,
  render: h => h(App)
}).$mount('#app');
